Optimal. Leaf size=45 \[ \frac{(a \sin (c+d x)+a)^4}{2 a^2 d}-\frac{(a \sin (c+d x)+a)^5}{5 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.046204, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {2667, 43} \[ \frac{(a \sin (c+d x)+a)^4}{2 a^2 d}-\frac{(a \sin (c+d x)+a)^5}{5 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2667
Rule 43
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+a \sin (c+d x))^2 \, dx &=\frac{\operatorname{Subst}\left (\int (a-x) (a+x)^3 \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac{\operatorname{Subst}\left (\int \left (2 a (a+x)^3-(a+x)^4\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac{(a+a \sin (c+d x))^4}{2 a^2 d}-\frac{(a+a \sin (c+d x))^5}{5 a^3 d}\\ \end{align*}
Mathematica [A] time = 0.081595, size = 46, normalized size = 1.02 \[ -\frac{a^2 \sin (c+d x) \left (2 \sin ^4(c+d x)+5 \sin ^3(c+d x)-10 \sin (c+d x)-10\right )}{10 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.036, size = 79, normalized size = 1.8 \begin{align*}{\frac{1}{d} \left ({a}^{2} \left ( -{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{15}} \right ) -{\frac{{a}^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{2}}+{\frac{{a}^{2} \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.94727, size = 76, normalized size = 1.69 \begin{align*} -\frac{2 \, a^{2} \sin \left (d x + c\right )^{5} + 5 \, a^{2} \sin \left (d x + c\right )^{4} - 10 \, a^{2} \sin \left (d x + c\right )^{2} - 10 \, a^{2} \sin \left (d x + c\right )}{10 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.67835, size = 136, normalized size = 3.02 \begin{align*} -\frac{5 \, a^{2} \cos \left (d x + c\right )^{4} + 2 \,{\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} - 4 \, a^{2}\right )} \sin \left (d x + c\right )}{10 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.52839, size = 129, normalized size = 2.87 \begin{align*} \begin{cases} \frac{2 a^{2} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac{a^{2} \sin ^{4}{\left (c + d x \right )}}{2 d} + \frac{a^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac{2 a^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac{a^{2} \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} + \frac{a^{2} \sin{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a \sin{\left (c \right )} + a\right )^{2} \cos ^{3}{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13963, size = 76, normalized size = 1.69 \begin{align*} -\frac{2 \, a^{2} \sin \left (d x + c\right )^{5} + 5 \, a^{2} \sin \left (d x + c\right )^{4} - 10 \, a^{2} \sin \left (d x + c\right )^{2} - 10 \, a^{2} \sin \left (d x + c\right )}{10 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]